home *** CD-ROM | disk | FTP | other *** search
- #include <exec/types.h>
- #include <exec/libraries.h>
- #include <intuition/intuition.h>
- #include <graphics/gfxbase.h>
-
- #ifdef __SASC
- #include <proto/intuition.h>
- #include <proto/graphics.h>
- #endif
-
- #ifdef __GNUC__
- #include <inline/intuition.h>
- #include <inline/graphics.h>
- #endif
-
- extern struct GfxBase *GfxBase;
-
- int
- IsPAL(void)
- {
- struct Screen *s;
- ULONG mode;
-
- s = LockPubScreen("Workbench");
- mode = GetVPModeID(&(s->ViewPort));
- UnlockPubScreen(NULL, s);
- if ((mode & PAL_MONITOR_ID) == PAL_MONITOR_ID){
- return TRUE;
- }
- if ((mode & NTSC_MONITOR_ID) == NTSC_MONITOR_ID){
- return FALSE;
- }
- /* Used to be this simple... */
- return (GfxBase->DisplayFlags & PAL) ? TRUE : FALSE;
- }
-